package pers.cj.pdos.utils;

import org.apache.shiro.crypto.hash.Md5Hash;

public class MD5Utils {
    /**
     * MD5散列算法
     * @param source - 密码明文
     * @param hashIterations - 散列次数
     * @param salt - 盐
     * @return
     */
    public static String md5(String source, int hashIterations, String salt){
        Md5Hash md5Hash = new Md5Hash(source, salt, hashIterations);

        String password_md5 = md5Hash.toString();
        return password_md5;
    }
}
